import {createStore,applyMiddleware,combineReducers} from 'redux'
import countReducer from './reducers/countReducer'
import movieReducer from './reducers/movieReducer'
import thunk from 'redux-thunk'


//合并多个reducer
const allReducer = combineReducers({
  movie:movieReducer,
  count:countReducer
})


//创建store并提供对应的reducer,接收第二个参数,是用来调用中间件的
const store = createStore(allReducer,applyMiddleware(thunk))
export default store


//